'use strict'

module.exports = app => {
  const { router, controller } = app
  // const adminauth = app.middleware.adminauth()
  router.post('/admin/checkLogin', controller.admin.main.checkLogin)
  router.get('/admin/getArticleList', controller.admin.main.getArticleList)
  router.get('/admin/getTypeInfo', controller.admin.main.getTypeInfo)
  router.get('/admin/getArticleById/:id', controller.admin.main.getArticleById)
  router.post('/admin/addArticle', controller.admin.main.addArticle)
  router.get(
    '/admin/updateArticle',
    controller.admin.main.updateArticle
  )
  router.get(
    '/admin/delArticle/:id',
    controller.admin.main.delArticle
  )
}
